<template>
    <div class="list">
        <div class="list-item" v-if="list.length > 0">
            <div class="item-content" v-for="(item,index) in list" :key="index">
                <div>
                    <span>{{item.name}}</span>
                </div>
                <div>
                    <span>{{new Date(item.date).toLocaleDateString()}}</span>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
  export default {
    name: "list",

    props: {
      list: {
        type: Array,
        default: () => [],
      }
    }
  }
</script>

<style scoped lang="scss">
    .list{

        .list-item{
            span{
                display: block;
                text-align: center;
            }
        }
    }
</style>
